var myChart = document.getElementById('main')
var chart = echarts.init(myChart)
var number1 = [32, 65, 150, 80, 70, 110, 130]
var number2 = [153, 32, 55, 90, 12, 65, 65]
var number3 = [153, 32, 55, 90, 12, 65, 65]
// 配置项option
var option = {
    title: {
        text: '周订单总数',
        left: '90%'
    },
    legend: {
        data: ['产品A', '产品B', '产品C']
    },
    xAxis: {
        type: 'category',
        data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
    },
    yAxis: {
        type: 'value'
    },
    series: [
        {
            data: number1,
            type: 'bar',
            name: '产品A'
        },
        {
            data: number2,
            type: 'bar',
            name: '产品B'
        },
        {
            data: number3,
            type: 'bar',
            name: '产品C'
        }
    ]
};

// 使用配置项
chart.setOption(option)